package com.example.module.ai.spark.dto;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

@Data
public class GptRespDto {

    //返回的json结果拆解
    @Data
    public static class JsonParse {
        private Header header;
        private Payload payload;
    }

    @Data
    public static class Header {
        public static final int SUCCESS_CODE = 0;
        // 会话最后一个结果
        public static final int LAST_SESSION_STATUS = 2;

        private int code;
        private int status;
        private String sid;
    }

    @Data
    public static class Payload {
        private Choices choices;
    }

    @Data
    public static class Choices {
        private List<Text> text;
    }

    @Data
    public static class Text {
        private String role;
        private String content;
    }

    @Data
    @Accessors(chain = true)
    public static class RoleContent {
        private String role;
        private String content;
    }

}
